package com.trkj.dao.jpa;

import java.util.List;

import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import com.trkj.pojos.Tbdepartment;

public interface LmbdepartmentDAO extends CrudRepository<Tbdepartment,Long> {
	@Query("select tb.departmentName from Tbdepartment tb where tb.departmentNo=?1")
	public String queryName(long d);
	
	@Query("select tb from Tbdepartment tb where tb.departmentName like %?1%")
	public List<Tbdepartment> queryByName(String d);
	
	@Query("select tb from Tbdepartment tb")
	public List<Tbdepartment> queryAllDept(Pageable pageable);	
}
